/*
 * main.cpp
 *
 *  Created on: Sep 28, 2009
 *      Author: Cha
 */
#include <iostream>
#include <fstream>

#include "SudokuSolver.h"

using namespace std;

//dimensions of 9x9 sudoku board
#define LENGTH 9
#define MAJOR_LENGTH 3

//some properties of the middle index value per major grid
#define FIRST_GRID_IDX 10
#define MAJOR_ROW_INCR 17
#define MAJOR_COL_INCR 3

int main(){
	
	/* Difficulty values
	 * 1 = easy
	 * 2 = medium
         * 3 = hard;
	 */


	/* 0 = DFS only
	 * 1 = + allDiff		<-- default should be at least 1, dunno if you want brute force unless 99% of the sudoku board is filled already
	 * 2 = + forward checking
	 * 3 = + Arc Consistency
	 */
	int mode = 1;
	
	cout << "SudokuSolver";
	for(int a = 1; a <= 3; a++){
		cout << "\n\n-------------------------\n";
		switch(a){
			case 1:
				cout << "Difficulty: Easy\n";
				break;
			case 2:
				cout << "Difficulty: Medium\n";
				break;
			case 3:
				cout << "Difficulty: Hard\n";
				break;
		}
		
		SudokuSolver solver = SudokuSolver(a);
		solver.initAdjList();
		
		cout << "\nInitial Board State:\n";
		solver.printBoardState();
		cout << "\n\n";
		solver.DFSSolver(mode);
		cout << "\nFinal Board State:\n";
		solver.printBoardState();
	}
}
